<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="正则入门笔记"><meta name="keywords" content="regexp 正则"><meta name="author" content="晟松"><meta name="copyright" content="晟松"><title>正则入门笔记 | 晟松</title><link rel="shortcut icon" href="/logo.png"><link rel="stylesheet" href="/css/index.css?version=1.9.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.0"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?c34d81d53341febe06a155941e2df16d";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '5.4.0'
} </script><meta name="generator" content="Hexo 5.4.0"></head><body><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="true"><div class="toggle-sidebar-info text-center"><span data-toggle="切换文章详情">切换站点概览</span><hr></div><div class="sidebar-toc"><div class="sidebar-toc__title">目录</div><div class="sidebar-toc__progress"><span class="progress-notice">你已经读了</span><span class="progress-num">0</span><span class="progress-percentage">%</span><div class="sidebar-toc__progress-bar"></div></div><div class="sidebar-toc__content"><ol class="toc"><li class="toc-item toc-level-5"><a class="toc-link" href="#1-%E5%85%83%E5%AD%97%E7%AC%A6"><span class="toc-number">1.</span> <span class="toc-text">1.元字符</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#2-%E5%8C%B9%E9%85%8D%E9%87%8D%E5%A4%8D"><span class="toc-number">2.</span> <span class="toc-text">2.匹配重复</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#3-%E5%AD%97%E7%AC%A6%E7%B1%BB"><span class="toc-number">3.</span> <span class="toc-text">3.字符类</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#4-%E5%88%86%E6%9E%9D%E6%9D%A1%E4%BB%B6"><span class="toc-number">4.</span> <span class="toc-text">4.分枝条件</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#5-%E5%88%86%E7%BB%84"><span class="toc-number">5.</span> <span class="toc-text">5.分组</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#6-%E5%8F%8D%E4%B9%89"><span class="toc-number">6.</span> <span class="toc-text">6.反义</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#7-%E5%90%8E%E5%90%91%E5%BC%95%E7%94%A8"><span class="toc-number">7.</span> <span class="toc-text">7.后向引用</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#8-%E9%9B%B6%E5%AE%BD%E6%96%AD%E8%A8%80"><span class="toc-number">8.</span> <span class="toc-text">8.零宽断言</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#9-%E6%B3%A8%E9%87%8A"><span class="toc-number">9.</span> <span class="toc-text">9.注释</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#10-%E8%B4%AA%E5%A9%AA%E5%8C%B9%E9%85%8D%E5%92%8C%E6%87%92%E6%83%B0%E5%8C%B9%E9%85%8D"><span class="toc-number">10.</span> <span class="toc-text">10.贪婪匹配和懒惰匹配</span></a></li></ol></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E7%89%B9%E5%88%AB"><span class="toc-number"></span> <span class="toc-text">特别</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E5%B8%B8%E7%94%A8"><span class="toc-number">1.</span> <span class="toc-text">常用</span></a></li></ol></div></div><div class="author-info hide"><div class="author-info__avatar text-center"><img src="/img/avatar.png"></div><div class="author-info__name text-center">晟松</div><div class="author-info__description text-center">晟松的博客</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://gitee.com/cheng_song">Gitee</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">52</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">45</span></a></div></div></div><div id="content-outer"><div id="top-container" style="background-image: url(/img/blog-bg.jpg)"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">晟松</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">Home</a><a class="site-page" href="/archives">Archives</a><a class="site-page" href="/tags">Tags</a><a class="site-page" href="/categories">Categories</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="post-info"><div id="post-title">正则入门笔记</div><div id="post-meta"><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2020-08-24</time><div class="post-meta-wordcount"><span>字数总计: </span><span class="word-count">2.1k</span><span class="post-meta__separator">|</span><span>阅读时长: 6 分钟</span></div></div></div></div><div class="layout" id="content-inner"><article id="post"><div class="article-container" id="post-content"><p>大概就是网上的30分钟入门正则表达的一个个人总结。<a target="_blank" rel="noopener" href="https://www.runoob.com/w3cnote/regular-expression-30-minutes-tutorial.html">链接</a></p>
<p>不过就只是进行一个简单的学习和简单实用。<a target="_blank" rel="noopener" href="https://blog.csdn.net/ZYC88888/article/details/98479629">一些方便常用的正则早有人进行了总结</a></p>
<p><a target="_blank" rel="noopener" href="https://www.runoob.com/jsref/jsref-obj-regexp.html">菜鸟的js的正则</a></p>
<h5 id="1-元字符"><a href="#1-元字符" class="headerlink" title="1.元字符"></a>1.元字符</h5><p>(\b)，代表单词的开头或者结尾，并不匹配任何字符，只表明是匹配这个位置。</p>
<p>(.)元字符，匹配除了换行符以外的任意字符。(*)同样是元字符，不过它代表的不是字符，也不是位置，而是数量——它指定(*)前边的内容可以连续重复使用任意次(可以是0次)以使整个表达式得到匹配。因此，(.*)连在一起就意味着任意数量的不包含换行的字符。如果是(+),这表示至少匹配一次或更多次</p>
<table>
<thead>
<tr>
<th align="left">代码</th>
<th align="left">说明</th>
</tr>
</thead>
<tbody><tr>
<td align="left">.</td>
<td align="left">匹配除换行符以外的任意字符</td>
</tr>
<tr>
<td align="left">\w</td>
<td align="left">匹配字母或数字或下划线或汉字</td>
</tr>
<tr>
<td align="left">\s</td>
<td align="left">匹配任意的空白符</td>
</tr>
<tr>
<td align="left">\d</td>
<td align="left">匹配数字</td>
</tr>
<tr>
<td align="left">\b</td>
<td align="left">匹配单词的开始或结束</td>
</tr>
<tr>
<td align="left">^</td>
<td align="left">匹配字符串的开始</td>
</tr>
<tr>
<td align="left">$</td>
<td align="left">匹配字符串的结束</td>
</tr>
</tbody></table>
<h5 id="2-匹配重复"><a href="#2-匹配重复" class="headerlink" title="2.匹配重复"></a>2.匹配重复</h5><p>就是进行多少次重复的匹配。一般是为了减少正则表达式的长度。</p>
<table>
<thead>
<tr>
<th align="left">代码/语法</th>
<th align="left">说明</th>
</tr>
</thead>
<tbody><tr>
<td align="left">*</td>
<td align="left">重复零次或更多次</td>
</tr>
<tr>
<td align="left">+</td>
<td align="left">重复一次或更多次</td>
</tr>
<tr>
<td align="left">?</td>
<td align="left">重复零次或一次</td>
</tr>
<tr>
<td align="left">{n}</td>
<td align="left">重复n次</td>
</tr>
<tr>
<td align="left">{n,}</td>
<td align="left">重复n次或更多次</td>
</tr>
<tr>
<td align="left">{n,m}</td>
<td align="left">重复n到m次</td>
</tr>
</tbody></table>
<p>例：^\w+匹配一行的第一个单词或整个字符串的第一个单词</p>
<h5 id="3-字符类"><a href="#3-字符类" class="headerlink" title="3.字符类"></a>3.字符类</h5><p>为了解决一些特定的字符没有专门的匹配元字符，使用**[]**方括号包含这些特殊字符就行。</p>
<p>例：[.?!]匹配标点符号(.或?或!)。[0-9]代表的含意与\d就是完全一致的</p>
<p>\(?0\d{2}[) -]?\d{8}  首先是一个转义字符(,它能出现0次或1次(?),然后是一个0，后面跟着2个数字(\d{2})，然后是)或-或空格中的一个(方括号中间有一个<strong>空格</strong>)，它出现1次或不出现(?)，最后是8个数字(\d{8})。匹配例如(010)88886666，或022-22334455，或02912345678。</p>
<h5 id="4-分枝条件"><a href="#4-分枝条件" class="headerlink" title="4.分枝条件"></a>4.分枝条件</h5><p>**|**，就是当成多个匹配式进行匹配。</p>
<p>例：0\d{2}-\d{8}|0\d{3}-\d{7}这个表达式能匹配两种以连字号分隔的电话号码：一种是三位区号，8位本地号(如010-12345678)，一种是4位区号，7位本地号(0376-2233445)。但要注意顺序，从左往右进行匹配，当匹配成功之后，后面的就不会再进行匹配了，有时候会出现一些奇怪的问题</p>
<h5 id="5-分组"><a href="#5-分组" class="headerlink" title="5.分组"></a>5.分组</h5><p>重复单个字符（直接在字符后面加上限定符就行了）；但如果想要重复多个字符又该怎么办？你可以用小括号**()**来指定子表达式(也叫做分组)，然后你就可以指定这个子表达式的重复次数了</p>
<h5 id="6-反义"><a href="#6-反义" class="headerlink" title="6.反义"></a>6.反义</h5><p>查找不属于某个能简单定义的字符类的字符</p>
<table>
<thead>
<tr>
<th align="left">代码/语法</th>
<th align="left">说明</th>
</tr>
</thead>
<tbody><tr>
<td align="left">\W</td>
<td align="left">匹配任意不是字母，数字，下划线，汉字的字符</td>
</tr>
<tr>
<td align="left">\S</td>
<td align="left">匹配任意不是空白符的字符</td>
</tr>
<tr>
<td align="left">\D</td>
<td align="left">匹配任意非数字的字符</td>
</tr>
<tr>
<td align="left">\B</td>
<td align="left">匹配不是单词开头或结束的位置</td>
</tr>
<tr>
<td align="left">[^x]</td>
<td align="left">匹配除了x以外的任意字符</td>
</tr>
<tr>
<td align="left">[^aeiou]</td>
<td align="left">匹配除了aeiou这几个字母以外的任意字符</td>
</tr>
</tbody></table>
<p>例：\S+匹配不包含空白符的字符串。&lt;a[^&gt;]+&gt;匹配用尖括号括起来的以a开头的字符串。</p>
<h5 id="7-后向引用"><a href="#7-后向引用" class="headerlink" title="7.后向引用"></a>7.后向引用</h5><p>大概就是在后面的正则使用前面的正则匹配出来的分组结果。具体查看文章开头链接</p>
<table>
<thead>
<tr>
<th align="left">分类</th>
<th align="left">代码/语法</th>
<th align="left">说明</th>
</tr>
</thead>
<tbody><tr>
<td align="left">捕获</td>
<td align="left">(exp)</td>
<td align="left">匹配exp,并捕获文本到自动命名的组里。exp为表达式</td>
</tr>
<tr>
<td align="left">(?<name>exp)</td>
<td align="left">匹配exp,并捕获文本到名称为name的组里，也可以写成(?’name’exp)</td>
<td align="left"></td>
</tr>
<tr>
<td align="left">(?:exp)</td>
<td align="left">匹配exp,不捕获匹配的文本，也不给此分组分配组号</td>
<td align="left"></td>
</tr>
<tr>
<td align="left">零宽断言</td>
<td align="left">(?=exp)</td>
<td align="left">匹配exp前面的位置</td>
</tr>
<tr>
<td align="left">(?&lt;=exp)</td>
<td align="left">匹配exp后面的位置</td>
<td align="left"></td>
</tr>
<tr>
<td align="left">(?!exp)</td>
<td align="left">匹配后面跟的不是exp的位置</td>
<td align="left"></td>
</tr>
<tr>
<td align="left">(?&lt;!exp)</td>
<td align="left">匹配前面不是exp的位置</td>
<td align="left"></td>
</tr>
<tr>
<td align="left">注释</td>
<td align="left">(?#comment)</td>
<td align="left">这种类型的分组不对正则表达式的处理产生任何影响，用于提供注释让人阅读</td>
</tr>
</tbody></table>
<p>例：\b(\w+)\b\s+\1\b可以用来匹配重复的单词，像go go, 或者kitty kitty。这个表达式首先是一个单词，也就是单词开始处和结束处之间的多于一个的字母或数字(\b(\w+)\b)，这个单词会被捕获到编号为1的分组中，然后是1个或几个空白符(\s+)，最后是分组1中捕获的内容（也就是前面匹配的那个单词）(\1)</p>
<h5 id="8-零宽断言"><a href="#8-零宽断言" class="headerlink" title="8.零宽断言"></a>8.零宽断言</h5><p>断言用来声明一个应该为真的事实。正则表达式中只有当断言为真时才会继续进行匹配。</p>
<p>例：(?=exp)也叫零宽度正预测先行断言，它断言自身出现的位置的后面能匹配表达式exp。比如\b\w+(?=ing\b)，匹配以ing结尾的单词的前面部分(除了ing以外的部分)，如查找I’m singing while you’re dancing.时，它会匹配sing和danc。</p>
<p>(?&lt;=exp)也叫零宽度正回顾后发断言，它断言自身出现的位置的前面能匹配表达式exp。比如(?&lt;=\bre)\w+\b会匹配以re开头的单词的后半部分(除了re以外的部分)，例如在查找reading a book时，它匹配ading。</p>
<p>同理也有负向零宽断言</p>
<p>例：零宽度负预测先行断言(?!exp)，断言此位置的后面不能匹配表达式exp。例如：\d{3}(?!\d)匹配三位数字，而且这三位数字的后面不能是数字；\b((?!abc)\w)+\b匹配不包含连续字符串abc的单词。</p>
<p>同理，我们可以用(?&lt;!exp),零宽度负回顾后发断言来断言此位置的前面不能匹配表达式exp：(?&lt;![a-z])\d{7}匹配前面不是小写字母的七位数字</p>
<h5 id="9-注释"><a href="#9-注释" class="headerlink" title="9.注释"></a>9.注释</h5><p>小括号通过语法(?#comment)来包含注释。例如：2[0-4]\d(?#200-249)|25<a href="?#250-255">0-5</a>|[01]?\d\d?(?#0-199)</p>
<h5 id="10-贪婪匹配和懒惰匹配"><a href="#10-贪婪匹配和懒惰匹配" class="headerlink" title="10.贪婪匹配和懒惰匹配"></a>10.贪婪匹配和懒惰匹配</h5><p>就是在匹配的时候，其结果是匹配竟可能长的字符串，还是竟可能短短的字符串</p>
<table>
<thead>
<tr>
<th align="left">代码/语法</th>
<th align="left">说明</th>
</tr>
</thead>
<tbody><tr>
<td align="left">*?</td>
<td align="left">重复任意次，但尽可能少重复</td>
</tr>
<tr>
<td align="left">+?</td>
<td align="left">重复1次或更多次，但尽可能少重复</td>
</tr>
<tr>
<td align="left">??</td>
<td align="left">重复0次或1次，但尽可能少重复</td>
</tr>
<tr>
<td align="left">{n,m}?</td>
<td align="left">重复n到m次，但尽可能少重复</td>
</tr>
<tr>
<td align="left">{n,}?</td>
<td align="left">重复n次以上，但尽可能少重复</td>
</tr>
</tbody></table>
<p>例：a.*b，它将会匹配最长的以a开始，以b结束的字符串。如果用它来搜索aabab的话，它会匹配整个字符串aabab。这被称为贪婪匹配。</p>
<p>a.*?b匹配最短的，以a开始，以b结束的字符串。如果把它应用于aabab的话，它会匹配aab（第一到第三个字符）和ab（第四到第五个字符）</p>
<h4 id="特别"><a href="#特别" class="headerlink" title="特别"></a>特别</h4><p>在js里面的正则似乎跟前面的正则有些不同</p>
<p>其语法为：</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line">/正则表达式主体/修饰符(可选)</span><br><span class="line">例：<span class="keyword">var</span> patt = <span class="regexp">/^\d+\.\d+$/g</span>  <span class="comment">//匹配是否带有小数</span></span><br></pre></td></tr></table></figure>

<table>
<thead>
<tr>
<th align="left">修饰符</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left">i</td>
<td align="left">执行对大小写不敏感的匹配。</td>
</tr>
<tr>
<td align="left">g</td>
<td align="left">执行全局匹配（查找所有匹配而非在找到第一个匹配后停止）。</td>
</tr>
<tr>
<td align="left">m</td>
<td align="left">执行多行匹配。</td>
</tr>
</tbody></table>
<h5 id="常用"><a href="#常用" class="headerlink" title="常用"></a>常用</h5><p>方括号用于查找某个范围内的字符：</p>
<table>
<thead>
<tr>
<th align="left">表达式</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left">[abc]</td>
<td align="left">查找方括号之间的任何字符。</td>
</tr>
<tr>
<td align="left">[0-9]</td>
<td align="left">查找任何从 0 至 9 的数字。</td>
</tr>
<tr>
<td align="left">(x|y)</td>
<td align="left">查找任何以 | 分隔的选项。</td>
</tr>
</tbody></table>
<p>元字符是拥有特殊含义的字符：</p>
<table>
<thead>
<tr>
<th align="left">元字符</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left">\d</td>
<td align="left">查找数字。</td>
</tr>
<tr>
<td align="left">\s</td>
<td align="left">查找空白字符。</td>
</tr>
<tr>
<td align="left">\b</td>
<td align="left">匹配单词边界。</td>
</tr>
<tr>
<td align="left">\uxxxx</td>
<td align="left">查找以十六进制数 xxxx 规定的 Unicode 字符。</td>
</tr>
</tbody></table>
<p>量词:</p>
<table>
<thead>
<tr>
<th align="left">量词</th>
<th align="left">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="left">n+</td>
<td align="left">匹配任何包含至少一个 <em>n</em> 的字符串。</td>
</tr>
<tr>
<td align="left">n*</td>
<td align="left">匹配任何包含零个或多个 <em>n</em> 的字符串。</td>
</tr>
<tr>
<td align="left">n?</td>
<td align="left">匹配任何包含零个或一个 <em>n</em> 的字符串。</td>
</tr>
</tbody></table>
</div></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">晟松</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://chengsong.info/2020/08/24/正则入门笔记/">https://chengsong.info/2020/08/24/正则入门笔记/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://chengsong.info">晟松</a>！</span></div></div><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/regexp-%E6%AD%A3%E5%88%99/">regexp 正则</a></div><nav id="pagination"><div class="prev-post pull-left"><a href="/2020/08/25/js%20promise%20prototype%E5%A4%8D%E4%B9%A0/"><i class="fa fa-chevron-left">  </i><span>js promise复习</span></a></div><div class="next-post pull-right"><a href="/2020/08/22/vue%E9%A1%B9%E7%9B%AEaxios%E5%B0%81%E8%A3%85%E4%B8%8Emock%E4%BD%BF%E7%94%A8/"><span>vue项目axios封装与mock等使用</span><i class="fa fa-chevron-right"></i></a></div></nav></div></div><footer class="footer-bg" style="background-image: url(/img/blog-bg.jpg)"><div class="layout" id="footer"><div class="copyright">&copy;2020 - 2023 By 晟松</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="icp"><a target="_blank" rel="noopener" href="http://www.beian.miit.gov.cn/"><span>湘ICP备2020021729号</span></a></div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_page_pv"><i class="fa fa-file"></i><span id="busuanzi_value_page_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.0"></script><script src="/js/fancybox.js?version=1.9.0"></script><script src="/js/sidebar.js?version=1.9.0"></script><script src="/js/copy.js?version=1.9.0"></script><script src="/js/fireworks.js?version=1.9.0"></script><script src="/js/transition.js?version=1.9.0"></script><script src="/js/scroll.js?version=1.9.0"></script><script src="/js/head.js?version=1.9.0"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>